package View;

import Interfaces.ModeInterface;

/**
 * 
 * @author stephenbwilliamson
 */
public class iSplice {
	private ModeInterface active;

	public iSplice() {
		// active = DatabaseConnection.getInstance();
		// DatabaseConnection.getInstance().load();
//		active = GeneVisualization.getInstance();
//		GeneVisualization.getInstance().load();
	}

	public void setMode(String mode) {
		try {
			active.unload();
			ModeInterface mi = (ModeInterface) Class.forName(mode)
					.newInstance();
			mi.load();
			active = mi;
		} catch (ClassNotFoundException e) {
			System.err.println("Unknown Mode!");
			System.exit(0);
		} catch (Exception e) {
			System.err.println("Exception: " + e.getMessage());
		}
	}

	public static void main(String[] args) {
		new iSplice();
	}
}
